<script>
import commonFieldsSet from '../components/commonFieldsSet'
import { getOrgConfig } from '../common/api';

export default {
    extends: commonFieldsSet,
    methods: {
        // 根据appId加载formName
        loadFormName() {
            return getOrgConfig().then(res => {
                this.formName = res.data && res.data.formName
            })
        },
        loadFieldList() {
            var pars = {
                formName: this.formName,
                appId: this.$x.tokenUtil.appId,
                businessType: this.$x.tokenUtil.businessType,
                token: this.$x.tokenUtil.token,
            }
            return this.$x.get('/orginfo/org/unit/fieldsList', pars)
        },
    },
    computed: {
        fgObjTitle() {
            return this.fgTagNames[this.uiPage && this.uiPage.ui.orgTag]
        },
    },
}

</script>
